package com.longnows.appserver.service.impl;

import com.longnows.appserver.model.Theme;
import com.longnows.appserver.repository.ThemeRespository;
import com.longnows.appserver.service.ThemeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Optional;

@Service
public class ThemeServiceImpl implements ThemeService {

    @Autowired
    private ThemeRespository themeRespository;

   public List<Theme> findByNames(List<String> names){
         return themeRespository.findByNames(names);
   }


   public Optional<Theme>  getThemeByNameWithSpu(String name){
       return themeRespository.findByName(name);
   }


}
